/**
 * related to adImg.ui
 * 
 * @Author : chenglm
 * @Timestamp : 2016-10-28
 */
var root=ui("$");
var alayout_ad = ui("alayout_ad");
var imageView_ad = ui("imageView_ad");
var borderView_dingwei = ui("borderView_dingwei");
var helperOpen = require("helper/open");
	
root.setMapping({
	//"borderView_dingwei.items" : "dingwei",
	"alayout_ad.tag" : "address",
	"imageView_ad.tag" : "x",
	"borderView_dingwei.tag" : "y"
});

root.on("dataRefreshed", function(){
	var center = borderView_dingwei.getView("center");
	var label_address = ui(center+'.label_address');
	label_address.text = alayout_ad.tag;
	ui(center+'.linearlayout_map').redraw();
	root.redraw();
});

ui(borderView_dingwei.getView("center")+'.linearlayout_map').on("touch", function(data){
	//helperOpen.open("source://view/area/map.ui",{x:imageView_ad.tag,y:borderView_dingwei.tag,address:alayout_ad.tag});
	helperOpen.open("source://view/user/userAddress/list.ui",{select:true});
});